# int 转 string
i = 11
s = str(i)
print(type(s))

# float 转 string
f = 1.13
s = str(f)
print(type(s))

# 字符串转int ,字符串中必须都是数字，不然报错
s = "1111"
print(int(s), type(int(s)))

# 字符串转float, 字符串中必须都是数字，不然报错
s = "1.11"
print(float(s), type(float(s)))

# float转int 会丢失精度
f = 111.11
print(int(f), type(int(f)))

if isinstance(f, float):
    print("这是浮点型")
